package com.neouton.crm.receiptRecords.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.neouton.common.util.PageUtil;
import com.neouton.crm.entity.SysUserEntity;
import com.neouton.crm.payRecords.entity.PaymentRecords;
import com.neouton.crm.pm.entity.SalesProjectManageVO;
import com.neouton.crm.receiptRecords.entity.ReceiptRecords;
import com.neouton.crm.receiptRecords.entity.ReceiptTable;
import com.neouton.crm.sales.entity.SalesFileRelationVO;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
* @author Mose
* @description 针对表【receipt_records(收票记录)】的数据库操作Service
* @createDate 2023-02-07 09:23:08
*/
public interface ReceiptRecordsService  {
    /**
     * 修改或保存收票记录
     * @param token
     * @param receiptRecords
     * @return
     */
    ReceiptRecords saveReceiptRecords(ReceiptRecords receiptRecords,String token);

    /**
     * 查询收票记录
     * @param receiptRecords
     * @return
     */
    List<ReceiptRecords> queryReceiptRecordedMoney(ReceiptRecords receiptRecords);
    /**
     * 审批通过
     * @param entity
     * @param token
     * @return
     */
    Boolean approvedReceiptRecord(ReceiptRecords entity, String token,Boolean auto);
    /**
     * 审批驳回
     * @param entity
     * @param token
     * @return
     */
    Boolean rejectionReceiptRecord(ReceiptRecords entity, String token);
    /**
     * 根据审批id获取历史数据
     * @param approvalId
     * @return
     */
    ReceiptRecords queryReceiptRecordedHistory(Integer approvalId);

    PageUtil<ReceiptRecords> queryReceiptRecordsListInfo(IPage<ReceiptRecords> page, ReceiptRecords receiptRecords, List<SysUserEntity> userList, String token);
    List<ReceiptRecords> queryReceiptRecordsListInfo(ReceiptRecords receiptRecords, List<SysUserEntity> userList, String token);
    void exportReceiptRecordsInfo(HttpServletResponse response, List<ReceiptRecords> list, String token) throws Exception;

    List<ReceiptTable> queryReceiptTablesByIdAndPlanPeriod(ReceiptTable entity);

    void updateReceiptTableData(Integer approvalId);



    List<ReceiptTable> getReceiptTableDataByReceiptId(Integer receiptRecordsId);

    PageUtil<ReceiptRecords> queryToDoReceiptRecordsListInfo(IPage<ReceiptRecords> page, ReceiptRecords receiptRecords, String token);

    Boolean deleteReceiptRecordById(Integer receiptRecordsId);

    void updateReceiptRecordAfterPass(ReceiptRecords receiptRecords, String token);

    ReceiptRecords queryReceiptRecordFromCache(int receiptRecordsId, String token);
}
